/**
 * 
 */
package com.contact.action;

import java.util.Locale;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author David Zheng
 *
 */
public class LocaleAction extends ActionSupport {
	
	private String userLocale;
		

	/* (non-Javadoc)
	 * @see com.opensymphony.xwork2.ActionSupport#execute()
	 */
	@Override
	public String execute() throws Exception {				
		
//		if ("zh_CN".equals(userLocale)) {
//			ActionContext.getContext().setLocale(Locale.SIMPLIFIED_CHINESE);	
//		} else {
//			ActionContext.getContext().setLocale(Locale.SIMPLIFIED_CHINESE);
//		}
		
//		HttpSession session = ServletActionContext.getRequest().getSession();
//		
//		 session.setAttribute("WW_TRANS_I18N_LOCALE", Locale.SIMPLIFIED_CHINESE);  
				
		return Action.SUCCESS;
	}


	/**
	 * @return the userLocale
	 */
	public String getUserLocale() {
		return userLocale;
	}


	/**
	 * @param userLocale the userLocale to set
	 */
	public void setUserLocale(String userLocale) {
		this.userLocale = userLocale;
	}
	
	

	
	

}
